Polyimide resin possesses excellent mechanical characteristics and heat-resistant properties and therefore it finds wide application as a molding, film-forming, and coating material. This resin, however, is unsatisfactory from the point of view of its molding, water-repellant properties, flexibility, and solubility. It was proposed to improve the aforementioned properties by copolymerizing it with polyorganosiloxane as a soft segment having amino groups on both molecular terminals (see Japanese Laid-Open Patent Application Heisei 4-36321). It was impossible, however, to effectively improve the properties of the silicon-containing polyimide resin obtained by the aforementioned method. This is because the polyorganosiloxane as a part of the molecular skeletal structure of the silicon-containing polyimide resin has a limited degree of freedom. It was proposed to solve this problem by graft-polymerizing the polyorganosiloxane chain to the side chain of the silicon-containing polyimide resin (see Japanese Laid-Open Patent Application Heisei 1-204931). However, even in this silicon-containing polyimide resin, the polyorganosiloxane chain did not have a sufficient degree of freedom.